x86: correct ordering of operations during S3 resume
authorJan Beulich <jbeulich@suse.com>
Mon, 16 Apr 2018 12:08:30 +0000 (14:08 +0200)
committerJan Beulich <jbeulich@suse.com>
Mon, 16 Apr 2018 12:08:30 +0000 (14:08 +0200)
commitcb2a4a449dfd50af309a333aa805835015fbc8c8
treea2ecd0d27f20145f7d96863570100f162a736172
parent16fb4b5a9a79f95df17f10ba62e9f44d21cf89b5
x86: correct ordering of operations during S3 resume

Microcode loading needs to happen before re-enabling interrupts, in case
only updated microcode allows the use of e.g. the SPEC_{CTRL,CMD} MSRs.
Otoh it doesn't need to happen at all when we didn't suspend in the
first place. It needs to happen before spin_debug_enable() though, as it
acquires a lock and hence would otherwise make
common/spinlock.c:check_lock() unhappy. As micrcode loading can be
pretty verbose, also make sure it only runs after console_end_sync().

cpufreq_add_cpu() doesn't need calling on the only "goto enable_cpu"
path, which sits ahead of cpufreq_del_cpu().

Reported-by: Simon Gaiser <simon@invisiblethingslab.com>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
Release-acked-by: Juergen Gross <jgross@suse.com>
xen/arch/x86/acpi/power.c